package com.sky.mapper;

import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author 冰白寒祭
 * @date 2023-09-05 14:06:08
 * @description 订单明细
 */

@Mapper
public interface OrderDetailMapper {

    /**
     * @MethodName: insertBatch
     * @Author 冰白寒祭
     * @Description: 批量插入订单明细
     * @Date: 2023-09-05 14:45:57
    */
    void insertBatch(List<OrderDetail> orderDetailList);

    /**
     * 根据订单id查询订单明细
     * @param orderId
     * @return
     */
    @Select("select * from order_detail where order_id = #{orderId}")
    List<OrderDetail> getByOrderId(Long orderId);
}
